package Java面试周阳.阻塞队列.顺序打印;

public class SyncAndReentrantLockDemo {
    public static void main(String[] args) {
        ShareResource shareResource = new ShareResource();

        new Thread(() -> {
            for (int i=0; i<10; i++) {
                shareResource.print5();
            }
        }, "A").start();

        new Thread(() -> {
            for (int i=0; i<10; i++) {
                shareResource.print10();
            }
        }, "B").start();

        new Thread(() -> {
            for (int i=0; i<10; i++) {
                shareResource.print15();
            }
        }, "C").start();
    }
}
